package com.servicesystem.servicesystem.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.servicesystem.servicesystem.entity.TtOrder;
import com.servicesystem.servicesystem.mapper.TtOrderMapper;
import com.servicesystem.servicesystem.service.TtOrderService;
import org.springframework.stereotype.Service;

/**
 * (TtOrder)表服务实现类
 *
 * @author makejava
 * @since 2020-09-11 11:54:57
 */
@Service("ttOrderService")
public class TtOrderServiceImpl extends ServiceImpl<TtOrderMapper, TtOrder> implements TtOrderService {

    @Override
    public Page<TtOrder> getAll(Long current) {
        Page<TtOrder> ttOrderPage = new Page<>(current, 10);
        QueryWrapper<TtOrder> ttOrderQueryWrapper = new QueryWrapper<>();
        ttOrderQueryWrapper.eq("order_status", "2");
        ttOrderQueryWrapper.eq("status", "1");
        return baseMapper.selectPage(ttOrderPage, ttOrderQueryWrapper);
    }

    @Override
    public void setTtOrderOver(String orderId) {

    }
}
